<%@ page import="service.IArticleService" %>
<%@ page import="service.impl.ArticleServiceImpl" %>
<%@ page import="pojo.Article" %>
<%@ page import="java.util.List" %>
<%@ page import="service.IUserService" %>
<%@ page language="java" contentType="text/html; utf-8" pageEncoding="utf-8" %>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
<%@ taglib prefix="f" uri="http://java.sun.com/jsp/jstl/fmt" %>
<!DOCTYPE html>
<html>
<head>
  <meta charset="utf-8">
  <title>基于 layui 的极简社区页面模版</title>
  <meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1">
  <meta name="keywords" content="fly,layui,前端社区">
  <meta name="description" content="Fly社区是模块化前端UI框架Layui的官网社区，致力于为web开发提供强劲动力">
  <link rel="stylesheet" href="/fly-3.0/res/layui/css/layui.css">
  <link rel="stylesheet" href="/fly-3.0/res/css/global.css">
</head>
<body>
<%@include file="common/header.jsp"%>
<div class="layui-hide-xs">
<%@include file="common/column.jsp"%>
</div>

<div class="layui-container">
  <div class="layui-row layui-col-space15">
    <div class="layui-col-md8">
      <div class="fly-panel">
        <div class="fly-panel-title fly-filter">
          <a>置顶</a>
          <a href="#signin" class="layui-hide-sm layui-show-xs-block fly-right" id="LAY_goSignin" style="color: #FF5722;">去签到</a>
        </div>
        <ul class="fly-list">
            <%--置顶内容或精贴--%>
            <c:forEach var="article" items="${top}">
                <li>
                    <a href="/user/home/${article.owner.userId}/" class="fly-avatar">
                        <img src="${article.owner.userHeadImage}" alt="${article.owner.userName}">
                    </a>
                    <h2>
                        <a class="layui-badge">${article.category.categoryName}</a>
                        <a href="/article/${article.articleId}/">${article.articleTitle}</a>
                    </h2>
                    <div class="fly-list-info">
                        <a href="/user/home/${article.owner.userId}/" link>
                            <cite>${article.owner.userName}</cite>
                            <i class="iconfont icon-renzheng" title="认证信息：XXX"></i>
                            <i class="layui-badge fly-badge-vip">VIP3</i>
                        </a>
                        <span><f:formatDate value="${article.articleBuildDate}" pattern="yyyy-MM-dd"/> </span>

                        <span class="fly-list-kiss layui-hide-xs" title="悬赏飞吻"><i
                                class="iconfont icon-kiss"></i> 60</span>
                        <c:choose>
                            <c:when test="${article.articleOver==1}">
                                <span class="layui-badge fly-badge-accept layui-hide-xs">已结</span>
                            </c:when>
                            <c:when test="${article.articleOver==0}">
                                <span class="layui-badge fly-badge-accept layui-hide-xs">未结</span>
                            </c:when>
                        </c:choose>
                        <span class="fly-list-nums">
                            <i class="iconfont icon-pinglun1" title="回答">${article.articleCommentNumber}</i>
                        </span>
                    </div>
                    <div class="fly-list-badge">
                        <c:if test="${! empty article.articleTop}">
                            <span class="layui-badge layui-bg-black">置顶</span>
                        </c:if>
                        <!--
                        <span class="layui-badge layui-bg-black">置顶</span>
                        <span class="layui-badge layui-bg-red">精帖</span>
                        -->
                    </div>
                </li>
            </c:forEach>
        </ul>
      </div>

      <div class="fly-panel" style="margin-bottom: 0;">
        
        <%@ include file="common/filter.jsp"%>

        <%@ include file="common/list.jsp"%>

        <div style="text-align: center">
          <div class="laypage-main">
            <a href="/column/all/" class="laypage-next">更多求解</a>
          </div>
        </div>

      </div>
    </div>
    <div class="layui-col-md4">

      <%@ include file="common/list-static.jsp"%>

      <div class="fly-panel fly-signin">
        <div class="fly-panel-title">
          签到
          <i class="fly-mid"></i> 
          <a href="javascript:;" class="fly-link" id="LAY_signinHelp">说明</a>
          <i class="fly-mid"></i> 
          <a href="javascript:;" class="fly-link" id="LAY_signinTop">活跃榜<span class="layui-badge-dot"></span></a>
          <span class="fly-signin-days">已连续签到<cite>16</cite>天</span>
        </div>
        <div class="fly-panel-main fly-signin-main">
          <button class="layui-btn layui-btn-danger" id="LAY_signin">今日签到</button>
          <span>可获得<cite>5</cite>飞吻</span>
          
          <!-- 已签到状态 -->
          <!--
          <button class="layui-btn layui-btn-disabled">今日已签到</button>
          <span>获得了<cite>20</cite>飞吻</span>
          -->
        </div>
      </div>

      <div class="fly-panel fly-rank fly-rank-reply" id="LAY_replyRank">
        <h3 class="fly-panel-title">回贴周榜</h3>
        <dl>
        </dl>
      </div>
      <%@ include file="common/list-hot.jsp"%>

      <%@ include file="common/list-ad.jsp"%>

      <div class="fly-panel fly-link">
        <h3 class="fly-panel-title">友情链接</h3>
        <dl class="fly-panel-main">
          <dd><a href="http://www.layui.com/" target="_blank">layui</a><dd>
          <dd><a href="http://layim.layui.com/" target="_blank">WebIM</a><dd>
          <dd><a href="http://layer.layui.com/" target="_blank">layer</a><dd>
          <dd><a href="http://www.layui.com/laydate/" target="_blank">layDate</a><dd>
          <dd><a href="mailto:xianxin@layui-inc.com?subject=%E7%94%B3%E8%AF%B7Fly%E7%A4%BE%E5%8C%BA%E5%8F%8B%E9%93%BE" class="fly-link">申请友链</a><dd>
        </dl>
      </div>

    </div>
  </div>
</div>

<%@include file="common/footer.jsp"%>

<%--<script type="text/javascript">var cnzz_protocol = (("https:" == document.location.protocol) ? " https://" : " http://");document.write(unescape("%3Cspan id='cnzz_stat_icon_30088308'%3E%3C/span%3E%3Cscript src='" + cnzz_protocol + "w.cnzz.com/c.php%3Fid%3D30088308' type='text/javascript'%3E%3C/script%3E"));</script>--%>

</body>
</html>